<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        let arrPers = [
            {
                name: '小明',
                ages: 18,
                sex: '男',
            },
            {
                name: '老刘',
                ages: 10,
                sex: '男',
            },
            {
                name: '小王',
                ages: 19,
                sex: '女',
            },
        ]
        let max = arrPers[0]
        for (let i = 0; i < arrPers.length; i++) {
            if (max.ages < arrPers[i].ages) {
                max = arrPers[i]
            }
        }
       

        
        document.write(`年龄最大的人是${max.name}`)

    </script>
</body>

</html>